var BpmnModdle = require('bpmn-moddle');
var fs = require("fs");
var DiffPatcher = require("./diffpatch/src/diffpatcher");


const axml = fs.readFileSync("./a.xml", "utf8");
const bxml = fs.readFileSync("./b.xml", "utf8");

var model_a = new BpmnModdle();
var model_b = new BpmnModdle();
const load_a = model_a.fromXML(axml);
const load_b = model_b.fromXML(bxml);

Promise.all([load_a, load_b]).then(([ma, mb]) => {
    console.info("start diff");
     const diff = new DiffPatcher().diff(ma, mb);
     console.info("finish diff");
});

